﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Pavilion
{
    public class UndoRedoTextureItem : IUndoRedoItem
    {
        Texture2D undoTexture, redoTexture;
        CTexture2D textureLayer;

        public UndoRedoTextureItem(CTexture2D textureLayer, Texture2D undoTexture)
        {
            this.textureLayer = textureLayer;
            this.undoTexture = undoTexture;
            this.redoTexture = textureLayer.TextureItem;
        }

        public void Undo()
        {
            textureLayer.TextureItem = undoTexture;
        }

        public void Redo()
        {
            textureLayer.TextureItem = redoTexture;
        }
    }
}
